Skip to content

[OM][firtool][om-linker] Elaborate public classes before emission/after linking. #10480

Open
uenoku wants to merge 1 commit into
llvm:mainfrom
uenoku:dev/hidetou/eargler-property
Open

[OM][firtool][om-linker] Elaborate public classes before emission/after linking. #10480
uenoku wants to merge 1 commit into
llvm:mainfrom
uenoku:dev/hidetou/eargler-property

Conversation

@uenoku
Copy link
Copy Markdown
Member

@uenoku uenoku commented May 16, 2026

Add a best-effort om-elaborate-object mode for elaborating all public OM classes. This mode leaves external objects and other unevaluated operations intact instead of treating them as errors, making it suitable for firtool’s final OM processing.

om-linker also runs another elaboration after linking so that properties can be used as interface contract.

This depends on #10440.

Assisted-by: augment: sonnet 4.5

@circt-bot
Copy link
Copy Markdown

circt-bot Bot commented May 16, 2026

Results of circt-tests run for c8c5f3c compared to results for 7b942d7: no change to test results.

uenoku added a commit that referenced this pull request May 16, 2026
Propagate symbol visibility from firrtl.module to om.class. Tweak mlir text syntax. 

Extracted from #10480. 
Assisted-by: augment: sonnet 4.5
@uenoku uenoku force-pushed the dev/hidetou/eargler-property branch from c8c5f3c to c6b92a8 Compare May 16, 2026 17:07
@circt-bot
Copy link
Copy Markdown

circt-bot Bot commented May 17, 2026

Results of circt-tests run for 2cceea1 compared to results for 0e62bcb: no change to test results.

@circt-bot
Copy link
Copy Markdown

circt-bot Bot commented May 17, 2026

Results of circt-tests run for b382281 compared to results for 2cceea1: no change to test results.

Add a best-effort om-elaborate-object mode for elaborating all public OM classes. This mode leaves external objects and other unevaluated operations intact instead of treating them as errors, making it suitable for firtool’s final OM processing.

Run this elaboration in firtool after om-freeze-paths so public OM classes expose frozen paths and folded object-field accesses. Preserve strict behavior for explicit target-class and test modes.

Also propagate FIRRTL symbol visibility to generated OM classes during LowerClasses, so classes generated from private FIRRTL modules/classes are private as well.
@uenoku uenoku force-pushed the dev/hidetou/eargler-property branch from b382281 to f862400 Compare May 18, 2026 17:20
@circt-bot
Copy link
Copy Markdown

circt-bot Bot commented May 18, 2026

Results of circt-tests run for f862400 compared to results for 0e62bcb: no change to test results.

Copy link
Copy Markdown
Member

@seldridge seldridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any changes that need to be made to domaintool as part of this PR?

This looks great!

Comment on lines +154 to +155
// Test all-public-classes mode elaborates public classes through private
// helpers, but does not elaborate private top-level classes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this missing a PUBLIC-NOT?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: naming this file elaborate-error.mlir or similar would be better.

@uenoku
Copy link
Copy Markdown
Member Author

uenoku commented May 19, 2026

Are there any changes that need to be made to domaintool as part of this PR?

No, this PR and #10440 don't change a public API, so there won't be any change.
However post emission IR no longer keep property assertions that don't depend on input parameters. firtool will start to raise errors if there is a property assertion failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants